@extends('layouts.app', ['activePage' => 'extended', 'menuParent' => 'endereco', 'titlePage' => __('Editar Tutorial')])

@section('content')
    <div class="content">
        <div class="container-fluid">
            <div class="row">

                <div class="col-md-12">
                    <div class="card ">
                        <div class="card-header card-header-rose card-header-text">
                            <div class="card-text">
                                <h4 class="card-title">Editar Tutorial</h4>
                            </div>
                        </div>
                        <div class="card-body ">
                            {!! Form::open(['route'=>['dash.endereco.put',$id],'method'=>'PUT','class'=>'form-horizontal']) !!}

                            <div class="row">
                                <label class="col-sm-2 col-form-label">Nome</label>
                                <div class="col-sm-10">
                                    <div class="form-group">
                                        <input type="text" class="form-control" name="title" value="{{$data->name}}">
                                        <span class="bmd-help">Nome</span>
                                    </div>
                                </div>
                            </div>

                            <div class="row">
                                <label class="col-sm-2 col-form-label">Base 64</label>
                                <div class="col-sm-10">
                                    <div class="form-group">
                                        <textarea name="text" id="editor" cols="30" rows="10"
                                                  class="form-control">{{$data->b64}}</textarea>
                                    </div>
                                </div>
                            </div>

                            <div class="card-footer">
                                <button type="submit" class="btn btn-fill btn-rose">Enviar</button>
                            </div>
                            {!! Form::close() !!}
                            @can('endereco-delete')
                                {!! Form::open(['route'=>['dash.endereco.delete',$id],'method'=>'DELETE','class'=>'form-horizontal']) !!}
                                <div class="card-footer">
                                    <button type="submit" class="btn btn-fill btn-danger">Remover</button>
                                </div>
                                {!! Form::close() !!}
                            @endcan
                        </div>
                    </div>
                </div>


            </div>
        </div>
    </div>
@endsection

@push('js')
@endpush